Is it possible to set one pin of the serial port continuously high using python (or C)? If yes, how?
|
Using the pyserial methods
|
|||
|
If you open the port, the Tx line should go to the voltage high state, and if you never send data it should stay in that state (see here). I've never actually tried this though. You might find you need to enable one of the control lines instead, like CTR. As for software, TheMachineCharmer's suggestion of pySerial is the most platform independent way of doing it. If you're on Windows, the Win32 API calls are summarized here. Look for |
|||
|